"""
n =  int(input("请输入你的成绩:>"))

if 90 <= n <= 100:
    print("Perfect")
"""

"""
n =  int(input("请输入 2 的几次方幂:>"))
num = 1

for i in range(1,n + 1):
    num *= 2

print("2 的 %d 次方幂是:> %d"%(n,num))
"""


"""
n =  int(input("有几个数:>"))
arr = []

for i in range(n):
    arr.append(int(input()))

for i in range(0,n - 1):
    for j in range (0, n - 1 - i):
        if arr[j] < arr[j + 1]:
            tmp = arr[j]
            arr[j] = arr[j + 1]
            arr[j + 1] = tmp

print(arr[0:5])
"""


"""
n = int(input("请输入一个数字:>"))
count = 0
z = n

while z != 0:
    z //= 10
    count += 1


print("倒着输出的数字:>",end=' ')
for i in range(0,count):
    print(n % 10,end='')
    n //= 10
"""


"""
n = int(input("请输入一个数字:>"))

if n >= 10:
    print("Danger++")
elif 4 <= n <= 9:
    print("Danger")
elif 0 <= n <= 3:
    print("Good")
"""


arr = []

for i in range(7):
    arr.append(int(input()))
max = arr[0]
min = arr[0]

k = 0
z = 0

for i in range(1,7):
    if max < arr[i]:
        k = i
    if min > arr[i]:
        z = i

arr[k] = 0
arr[z] = 0
sum = 0

for i in range(0,7):
    sum += arr[i]

sum //= 5
print("%.2d" %sum)
